package com.meitianhui.convenitenbuy.module.home.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.meitianhui.convenitenbuy.R;
import com.meitianhui.convenitenbuy.module.home.model.bean.HomeGoodsInfo;
import com.meitianhui.convenitenbuy.util.GlideUtils;

import java.util.List;

/**
 * 品牌领
 * Created by Administrator on 2017/11/3.
 */
public class HomeBrandAdapter extends BaseQuickAdapter<HomeGoodsInfo.Convient, BaseViewHolder> {

    private Context context;

    public HomeBrandAdapter(Context context, List data) {
        super(R.layout.item_home_brand_goods_item, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, HomeGoodsInfo.Convient item) {
        ImageView ivStorePic = helper.getView(R.id.iv_brand);
        GlideUtils.setRectImage(context, item.getBrandImg(),
                R.mipmap.icon_default_picture, R.mipmap.icon_default_picture, ivStorePic);
    }

}
